The subject matter discussed in the background section should not be assumed to be prior art merely as a result of its mention in the background section. Similarly, a problem mentioned in the background section or associated with the subject matter of the background section should not be assumed to have been previously recognized in the prior art. The subject matter in the background section merely represents different approaches, which in and of themselves may also correspond to embodiments of the claimed subject matter.
In computer science, polymorphism is a programming language feature that allows values of different data types to be handled using a uniform interface. A function that can evaluate or be applied to values of different types is known as a polymorphic function. A data type that can appear to be of a generalized type (e.g., a list with elements of arbitrary type) is designated polymorphic data type like the generalized type from which such specializations are made.
Different kinds of polymorphism are known. For instance, if a function denotes different and potentially heterogeneous implementations depending on a limited range of individually specified types and combination, it is called ad-hoc polymorphism. Ad-hoc polymorphism is supported in many languages using function and method overloading.
Conversely, if code is written without mention of any specific type and thus can be used transparently with any number of new types, it is called parametric polymorphism. Parametric polymorphism is widely supported in statically typed functional programming languages. In the object-oriented programming community, programming using parametric polymorphism is sometimes called generic programming.
In object-oriented programming, subtype polymorphism or inclusion polymorphism is a concept in type theory wherein a name may denote instances of many different classes as long as they are related by some common super class. Inclusion polymorphism is generally supported through subtyping, that is to say, objects of different types may be substituted for objects of another type, and thus can be handled via a common interface.
As beneficial as polymorphism is to programmers, its practicality is severely limited when used on computing platforms having non-uniform and heterogeneous computing hardware.
For instance, with conventional methodologies, the targeted computing platform upon which code is expected to run is homogenous, such as a computing platform using a conventional Central Processor Unit (CPU). During execution of code developed using these conventional methodologies, it is assumed that a pointer followed will arrive at an appropriate instruction for execution via the exemplary CPU. This assumption has been safe historically because homogenous systems, such as those having only a CPU or multiple CPUs of the same type for executing instructions, were so common place.
Unfortunately, in a heterogeneous computing platform having multiple non-uniform hardware components, each of which being capable to execute instructions, the preceding assumption may be erroneous. Thus, use of the conventional methodologies results in the following of a pointer that may yield a result incapable of being executed by one of the hardware components in the non-uniform environment.
The present state of the art may therefore benefit from systems and methods for enabling polymorphic objects across devices in a heterogeneous platform as described herein.